import requests
import time

'''
@url:网址
'''
def get_web_content(url):
	try:
		r = requests.get(url, timeout=30)
		r.raise_for_status()
		r.encoding = r.apparent_encoding
		return r.text
	except:
		return '出现异常'

if __name__ == '__main__':
	url = 'https://www.jd.com/robots.txt'
	star_time = time.time()
	for i in  range(1,100):
		get_web_content(url)
	end_time = time.time()
	print('Time: '+ str(end_time - star_time))